Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoDAG prototyping #1011

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

NoDAG prototyping #1011

wants to merge 2 commits into from

Conversation

bolekk
Copy link
Contributor

@bolekk bolekk commented Jan 24, 2025

No description provided.

pkg/workflows/wasm/host/test/nodag/main.go Outdated Show resolved Hide resolved
pkg/workflows/wasm/host/test/nodag/main.go Outdated Show resolved Hide resolved
pkg/workflows/wasm/runtime_v2.go Outdated Show resolved Hide resolved

func RunWorkflow(runtime sdk.RuntimeV2, triggerOutputs basictrigger.TriggerOutputs) error {
// two action calls "futures"
actionCall1, _ := wasm.NewCapabilityCall[basicaction.ActionInputs, basicaction.ActionConfig, basicaction.ActionOutputs](
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things. First, the runtime should make the call, or you can't test without WASM. Second, we'll have generated helpers for the calls that take and return the right types given a runtime :).

Comment on lines 53 to 98
switch {
case req.GetSpecRequest() != nil:
rsp, innerErr := r.handleSpecRequest(factory, req.Id)
if innerErr != nil {
resp.ErrMsg = innerErr.Error()
} else {
resp = rsp
}
case req.GetRunRequest() != nil:
rsp, innerErr := r.handleRunRequest(factory, req.Id, req.GetRunRequest())
if innerErr != nil {
resp.ErrMsg = innerErr.Error()
} else {
resp = rsp // should happen only when workflow is done processing (i.e. no more capability calls)
}
default:
resp.ErrMsg = "invalid request: message must be SpecRequest or RunRequest"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For regular execution, I don't think the WASM should asked to do work. How would I enable parallelism?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite follow but I think the planned change to use a separate import will resolve this concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants